<?php
/**
* Display the homepage screen
*
* @author       Fabrice Douteaud <admin@clearbudget.net>
* @package      snippets
* @access       public
*/

/***********************************************************************

  Copyright (C) 2008  Fabrice Douteaud (admin@clearbudget.net)

    This file is part of ClearBudget.

    ClearBudget is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    ClearBudget is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with ClearBudget.  If not, see <http://www.gnu.org/licenses/>.


************************************************************************/
//prevent direct access
if(!defined('ENGINEON')) die('Direct access forbidden');
global $context;
if(count($cloud) == 0) {
  $msg = sprintf($keys->error_noSuggestionFound, KEYWORDSUGGESTIONTHRESHOLD);
  echo "<div class=\"warning\"><blockquote>{$msg}</blockquote></div><br/>";
  return;
  }
if($cloud!=false) {?>
<table class="tableReport">
<tr><th colspan="2"><div class="cloudDiv"><ul id="cloud">
<?php
foreach($cloud as $name=>$tag) {
  echo '<li><a cloud="'.$tag['id'].'" class="tag'.$tag['tag'].'">'.$name.'</a></li>';
  }
?>
</ul></div></th></tr>
<?php
foreach($cloud as $name=>$tag) {
  echo "<tr class=\"hoverHighlight\" id=\"cloud-{$tag['id']}\"><td>{$name}</td><td>{$tag['msg']}</td></tr>";
  } 
?>
</table>
<?php
    }
?>
<br/>